var prosWap = document.getElementById('pros_wap'),
    str = pro_item = prosWap.innerHTML,
    html = '',
    pro_datas = [
            //['送尚体验商城', 'img/songshang.png', 'http://songshang.xsy.9885.net/mobile.php', 'http://songshang.xsy.9885.net/', '郑凯健', '陈丽媛', '2015-11-15'],
            ['拉朋画廊', 'img/lapeng.jpg', 'http://hualang.xsy.9885.net/mobile.php', 'http://hualang.xsy.9885.net/', 'http://hualang.xsy.9885.net/mobile.php', '于淑栋', '王英', '2015-10-16'],
            //['妙身堂', 'img/miao.png', 'http://miao.xsy.9885.net/mobile.php', 'http://miao.xsy.9885.net/', '陆明磊', '陈丽媛', '2015-10-15'],
            ['紫罗兰', 'img/ziluolan.png', 'http://www.huawsc.com/mobile.php', 'http://www.huawsc.com/', 'http://www.huawsc.com/mobile.php', '陆明磊', '王英', '2015-10-14'],
            ['宝达', 'img/baoda.png', '', 'http://www.yangguangdaikuan.com/', '', '赵小玮', '陈丽媛', '2015-10-06'],
            ['巨浪', 'img/julang.png', 'http://www.jlws99.com/mobile.php', 'http://www.jlws99.com/', 'http://www.jlws99.com/mobile.php', '郑凯健', '陈丽媛', '2015-09-29'],
            ['TNS', 'img/tns.png', '', 'http://shop.bktns.net/', '', '郑凯健', '陈丽媛', '2015-09-05'],
            //['369购物', 'img/369.png', 'http://www.taczsc.com/mobile.php', 'http://www.taczsc.com/', '闫秋振', '陈丽媛', '2015-09-05'],
            ['精彩在沃', 'img/jingcai.png', 'http://www.jczwwsc.com/mobile.php', 'http://www.jczwwsc.com/', 'http://www.jczwwsc.com/mobile.php', '闫秋振', '王英', '2015-09-04'],
            ['世友电子商务', 'img/shiyou.png', 'http://www.sydzsy99.com/mobile.php', 'http://www.sydzsy99.com/', 'http://www.sydzsy99.com/mobile.php', '张彬', '王英', '2015-08-31'],
            ['西红柿', 'img/xihongshi.png', '', 'http://www.xhsmall.com/', '', '郑凯健、宋奎', '陈丽媛', '2015-8-30'],
            ['五行天彩微商城', 'img/wuxing.png', 'wxtc.xsy.9885.net/mobile.php', 'http://wxtc.xsy.9885.net/', 'wxtc.xsy.9885.net/mobile.php', '郑凯健', '吴铎', '2015-08-26'],
            ['劲霸健康科技', 'img/jinba.png', '', 'http://www.chinajinba.com.cn/', '', '张彬', '王英', '2015-08-25'],
            ['天雨宝华丸微商城', 'img/tianyu.png', 'http://www.tianyubaohuawan.com/mobile.php', '', 'http://www.tianyubaohuawan.com/mobile.php', '袁振', '吴铎', '2015-08-17'],

            ['趣海购', 'img/quhaigou.png', 'http://www.radar518.com/mobile.php', 'http://www.radar518.com/', 'http://www.radar518.com/mobile.php', '张彬', '王英', '2015-08-01'],
            ['陈姐微商城', 'img/chenjie.jpg', 'http://ifclvxingusa.com/', '', 'http://ifclvxingusa.com/', '郑凯健', '吴铎', '2015-07-31'],
            ['中鑫好想购', 'img/haoxianggou.png', 'http://www.hxg100.com/mobile.php', 'http://www.hxg100.com/', 'http://www.hxg100.com/mobile.php', '张彬', '王英', '2015-07-31'],
            ['舜心移动商城', 'img/shunxin.png', 'http://www.shunshan258.cn/mobile.php', 'http://www.shunshan258.cn/', 'http://www.shunshan258.cn/mobile.php', '闫秋振', '王英', '2015-07-01'],
            ['于氏优品微商城', 'img/yushi.png', 'http://297320.ichengyun.net/', '', 'http://297320.ichengyun.net/', '于淑栋', '吴铎', '2015-07-04'],
            ['怡康', 'img/xiyinni.png', 'http://www.ykxyn.com/wap.php', 'http://www.ykxyn.com/', 'http://www.ykxyn.com/wap.php', '袁振', '王英', '2015-07-01'],
            ['六叠日', 'img/liudieri.png', 'http://www.ldr188.com/mobile.php', 'http://www.ldr188.com/', 'http://www.ldr188.com/mobile.php', '闫秋振', '陈丽媛', '2015-6-30'],
            ['典逸客微商城', 'img/dianyi.png', '', '', 'http://www.fddmy.com/Admin/?s=/Public/login', '陆明磊', '王英', '2015-06-13'],
            ['易指汇微商城', 'img/yizhihui.png', 'http://www.yzh868.com/mobile.php', '', 'http://www.yzh868.com/mobile.php', '于淑栋', '吴铎', '2015-06-13'],
            ['创业', 'img/chuangye.png', '', 'http://www.china-cysc.com/', '', '陆明磊', '陈丽媛', '2015-06-01'],
            ['鲁城商贷','img/lucheng.png','','http://www.luchengshangdai.com/', '','郑凯健','薛佳佳','2015-06-06'],
            ['慧淘','img/huitao.png','http://huitaozg.com/mobile.php','http://huitaozg.com/mobile.php', 'http://huitaozg.com/mobile.php', '张彬','李学双','2015-6-26'],
            ['靓八度','img/liangba.png','http://www.daotong888.com/mobile.php','', '', '张彬','李学双','2015-7-23'],
            ['宏润达','img/hongrun.jpg','http://ahhongrunda.com/mobile.php','', 'http://ahhongrunda.com/mobile.php','宋奎','李学双','2015-7-18'],
            ['易镜电商','img/yijing.png','http://yijing.xsy.9885.net/mobile.php','http://yijing.xsy.9885.net/', 'http://yijing.xsy.9885.net/mobile.php','于树栋','薛佳佳','2015-7-6'],
            ['物价局','img/wujia.png','','http://wujia.yidong.9885.net:89/pc_denglu.php', '', '赵小伟','薛佳佳','2015-09-12'],
            ['好品商城','img/haopin.png','http://www.ijxhp.com/mobile.php','http://www.ijxhp.com/', 'http://www.ijxhp.com/mobile.php', '于树栋','薛佳佳','205-8-6'],
            ['燕麦王','img/maiwang.png','http://ymw.xsy.9885.net/mobile.php','http://ymw.xsy.9885.net/', 'http://ymw.xsy.9885.net/mobile.php', '宋奎','薛佳佳','客户测试'],
            ['鑫基汇','img/xinji.png','http://www.xinjihui.cc/mobile.php','http://www.xinjihui.cc/', 'http://www.xinjihui.cc/mobile.php', '张彬','薛佳佳','2015-9-5'],
            ['惠超','img/huichao.jpg','http://www.mlfwsc.com/mobile.php','', 'http://www.mlfwsc.com/mobile.php', '郑凯健','李学双','2015-7-25'],
            ['檀指','img/tanzhi.png','http://www.szmoonland.com/mobile.php','','http://www.szmoonland.com/mobile.php','袁振','李学双','2015-10-14'],
            ['庆云商超','img/xiangyun.jpg','http://qingyun.xsy.9885.net/mobile.php','http://qingyun.xsy.9885.net/','http://qingyun.xsy.9885.net/mobile.php','郑凯健','李学双','2015-10-7'],
            ['乐翻购物','img/lefan.png','http://lefannet.com/mobile.php','http://lefannet.com/','http://lefannet.com/mobile.php','王勇','薛佳佳','跟随新商云升级'],
            ['壹购物','img/yigou.jpg','http://www.xfcmall.com/mobile.php','http://www.xfcmall.com/','http://www.xfcmall.com/mobile.php','宋奎','李学双','2015-9-1'],
            ['欧硕电器','img/oushuo.jpg','http://www.oushuojituan.com/mobile.php','http://www.oushuojituan.com/','http://www.oushuojituan.com/mobile.php','袁振','李学双','2015-8-11'],
            ['紫盛善美','img/shanmei.png','http://www.zsshanmei.com/mobile.php','http://www.zsshanmei.com','http://www.zsshanmei.com/mobile.php','陆明磊','孔凤华','2015-9-28'],
            ['多鱼微购','img/duoyu.png','http://www.doouyu.cn/mobile.php','http://www.doouyu.cn/','http://www.doouyu.cn/mobile.php','陆明磊','李学双','2015-8-10'],
            ['丰收财富','img/fengshou.png','','http://fengshoucaifu.com/','','袁振','薛佳佳','2015-06-05']
        ];
for(var i in pro_datas) {
    str = pro_item;
    for(var key in pro_datas[i]) {
        str = str.replace('#param'+(parseInt(key)+1), pro_datas[i][key]);
    }
    html += str;
}

pros_wap.innerHTML = html;
var domList = document.querySelectorAll('.pro-item'),
    wechatLink = document.querySelectorAll('.js-wechat'),
    qrcode = document.querySelectorAll('.qrcode-box')

for (var i = 0; i < domList.length; i++) {
    var img = domList[i].querySelector('.pro-logo'),
        proLink = domList[i].querySelectorAll('.pro-link');
    for (var j = 0; j < proLink.length; j++) {
        if (!proLink[j].getAttribute('href')) {
            proLink[j].parentNode.removeChild(proLink[j]);
        }
    }
    img.onerror = function () {
        this.src='img/default_image.png';
    }
}
// alert(Array.prototype.forEach)
// for (var i = 0; i < wechatLink.length; i++) {
//     wechatLink[i].onclick = function () {
        
//     }
// }
$('.js-wechat').click(function () {
    $(this).parents('.pro-item').find('.qrcode-box').toggleClass('show');
})
prosWap.style.display = '';

